home *** CD-ROM | disk | FTP | other *** search
/ Aplicaciones Windows / Aplicaciones Windows.iso / Educa / EX.ZIP / EXTUT.DOC < prev    next >
Text File  |  1997-03-07  |  27KB  |  767 lines

  1.                            Tutorial
  2.  
  3.                           for Ex 1.40
  4.                          =============
  5.  
  6.                     (Tutorial Version 1.40)
  7.  
  8.  
  9. This is a series of step-by-step  examples, illustrating  how to 
  10. access some of the features of Ex. The series is far from  being 
  11. complete and will not replace the program manual,  which remains 
  12. the required reading anyway.
  13.  
  14. This   tutorial,   (c)  1995   by  J.A.Wrotniak,   is  available 
  15. exclusively to the registered users of Ex and should not  be re- 
  16. distributed in any form.
  17.  
  18.  
  19. Table of Contents
  20.  
  21.    1. The basics
  22.       1.1. Adding two and two
  23.       1.2. Computing a longer expression
  24.       1.3. Setting display precision
  25.       1.4. Correcting errors
  26.       1.5. Cutting and pasting
  27.    2. Operations on units
  28.       2.1. Unit conversion
  29.       2.2. Operations on feet and inches
  30.       2.3. Degrees, minutes and seconds
  31.    3. Function plotting
  32.       3.1. Plotting a single function
  33.       3.2. Adding functions to a plot
  34.    4. Numeric operations
  35.       4.1. Computing an integral
  36.       4.2. Computing a derivative
  37.       4.3. Computing a sum
  38.       4.4. Solving an equation
  39.    5. User-defined functions
  40.       5.1. Defining and using a function
  41.       5.2. Nesting defined functions
  42.    6. Data buffer operations
  43.       6.1. One-variable statistics
  44.       6.2. Computations on data buffer
  45.       6.3. Filling the X buffer with simulated data
  46.       6.4. Histogramming the data
  47.       6.5. Overlaying a function plot on a histogram
  48.    7. Linear algebra
  49.       7.1. Solving a system of linear equations
  50.       7.2. Testing the result: multiplying a matrix by a vector
  51.       7.3. Changing the vector/matrix display format
  52.  
  53. 1. The basics
  54.  
  55.  
  56. 1.1. Adding two and two
  57.  
  58. At this  moment the  long line  at the  top of  the Main  Screen 
  59. should be empty. If this is not the case, press the Esc key.
  60.  
  61. Now, type
  62.  
  63.      2+2
  64.  
  65. and press Enter (on some computers marked as Return). Your  line 
  66. will be reformatted to
  67.  
  68.      2+2=@
  69.  
  70. and the result will be shown in the  Variable Field  "@" and  in 
  71. the Last Result Field  just below  your expression.  Because you 
  72. have not specified where you want the result stored, Ex used the 
  73. "default variable", @. This is to save you some typing.
  74.  
  75. Note that the upper  result is  shown without,  and the  lower - 
  76. with trailing zeros. Ex will drop the insignificant zeros in the 
  77. Last Result Field.
  78.  
  79. What if you want the result stored in another variable, e.g., X?
  80.  
  81. Press  the  Backspace key  (sometimes denoted  with a  long left 
  82. arrow). The @ variable at the right side of the  expression will 
  83. be erased. Type "X" (without quotes,  lower or  upper case)  and 
  84. press Enter again. Done.
  85.  
  86.  
  87. 1.2. Computing a longer expression
  88.  
  89. Now let us do something more  ambitious, evaluate  an expression 
  90. using functions. We will  try to  compute a  side of  a triangle 
  91. given the two other sides (2.75 and 3.6)  and the  angle between 
  92. them (72 degrees).
  93.  
  94. First, we need to  switch into  the Degree  mode. Look  near the 
  95. right of the Status Line. When you first run Ex,  there will  be 
  96. an "R" there, meaning that the program is in the Radian mode. To 
  97. switch, press the F2 function key, marked as [Set]. You will see 
  98. that the F-key menu at the bottom has  changed. Press  the F-key 
  99. marked  as  [Deg].  An  arrow  will  appear  left  to  its  menu 
  100. abbreviation, and "R" will change to "D". We  are in  the Degree 
  101. mode. You may go back to the TOP Menu by pressing [TOP].
  102.  
  103. Clear the Expression Line by pressing Esc, type
  104.  
  105.      sqr(sq 2.75+sq 3.6-2*2.75*3.6*cos 72)
  106.  
  107. and  press  Enter.  The  result  will  be 4.345683051  (with the 
  108. default accuracy of 12 significant digits).
  109.  
  110. This  is  not  the  best  way  to do  it: numeric  constants are 
  111. repeated, and any changes to the data will require quite  lot of 
  112. re-editing. Let us store  the data  in variables  first; let  us 
  113. also use the square operator (not function) and change the angle 
  114. to 72 degrees, 12 minutes and 31 seconds.
  115.  
  116. Clear the display with Esc. Type
  117.  
  118.      2.75=a
  119.  
  120. Press Enter, clear again, type
  121.  
  122.      3.6=b
  123.  
  124. and press Enter and  Escape. Your  values will  be shown  in the 
  125. Variable Fields. Now enter
  126.  
  127.      72°12'31"=g
  128.  
  129. using Alt-D, Alt-M and Alt-S key combinations for degree, minute 
  130. and second symbols.
  131.  
  132. After  clearing  the  display  again,  type  in  the   following 
  133. expression (use Alt-2 for the square symbol); you do not have to 
  134. be very neat about it:
  135.  
  136.      sqr(a²+b²-2abcosg=c
  137.  
  138. After pressing Enter you will have the value computed and stored 
  139. in C. Note that Ex has also re-formatted your input to
  140.  
  141.      sqr(A²+B²-2AB·cos G)=C
  142.  
  143. by adding the missing right parenthesis, converting variables to 
  144. upper  case  and inserting  the implied  multiplication operator 
  145. between "B" and "cos".
  146.  
  147. (By the  way, if  you are  entering angular  values in  degrees, 
  148. minutes and seconds as shown above, you do  not need  be in  the 
  149. Deg mode; the Rad mode would be OK, too.)
  150.  
  151.  
  152. 1.3. Setting display precision
  153.  
  154. The result of the last example was displayed with 12 significant 
  155. digits of accuracy. This can be easily changed.
  156.  
  157. Go to  the SET  Menu (if  you are  at the  TOP Menu,  just press 
  158. [Set], otherwise press [TOP] first). Now  press [Dig];  from the 
  159. new menu choose [Res]. Enter 16,  press Enter.  Now you  have 16 
  160. significant digits of your result shown.
  161.  
  162. Setting the number of significant digits corresponds to  a given 
  163. relative accuracy. A desired absolute accuracy can be defined by 
  164. setting the number of digits after the decimal point.
  165.  
  166. To do this, press  [Res] in  the DIG  Menu again  and enter  the 
  167. number  of  digits preceded  by a  point, e.g.,  ".6". Now  your 
  168. result will be shown as 3.804283, although its internally stored 
  169. value has not changed.
  170.  
  171.  
  172. 1.4. Correcting errors
  173.  
  174. Let us assume that you want to compute just 2A times cos G, with 
  175. the data as set above. Press Escape, type
  176.  
  177.      2acosg=u
  178.  
  179. and press Enter. Not  only will  you get  an error  message, but 
  180. your reformatted input will be shown as
  181.  
  182.      2·acos G=U
  183.  
  184. and  this  is  not  what  you  wanted  (acos  is the  arc cosine 
  185. function). Press any key to remove the message, and use the left 
  186. arrow key  to position  the cursor  over the  "c". Hit  Space to 
  187. separate "a" from "c". Now, that is better. Hit Return.
  188.  
  189. Of course, the problem would have been avoided if you typed in
  190.  
  191.      2Acosg=u
  192.  
  193. as uppercase letters are always treated  as variables  and never 
  194. merged into function names.
  195.  
  196.  
  197. 1.5. Cutting and pasting
  198.  
  199. In the  last example,  by pressing  Escape we  have cleared  the 
  200. previous expression, and now we may need it. Good news:  the old 
  201. expression is not lost, being stored in the paste buffer.
  202.  
  203. Press  the  Insert  key  (Shift-Del  on  the  HP95LX).  The  new 
  204. expression  will  be  replaced  with the  old one.  Press Insert 
  205. again, and again: you can see the paste buffer swapped  with the 
  206. display.
  207.  
  208. Now you should have the older expression displayed;  if this  is 
  209. not the case, press Insert again.  The newer  expression can  be 
  210. also pasted into an empty line. To do it, first  press the  down 
  211. arrow key. The line number near top left will change to "2", and 
  212. the expression line will be empty.  Press Escape;  you will  see 
  213. the buffer pasted into the line.   The up  arrow will  bring you 
  214. back to Line 1.
  215.  
  216.  
  217. 2. Operations on units
  218.  
  219.  
  220. 2.1. Unit conversion
  221.  
  222. Let us convert 60 miles per hour into meters per  second. To  do 
  223. it, clear the display by pressing Esc, type
  224.  
  225.      60
  226.  
  227. and press  the Enter  key. The  value of  60 will  be stored  in 
  228. variable @. Now get  to the  CON (Conversion)  Menu by  pressing 
  229. [Con],  and  then  press  [Uni].  A  pop-up "CONVERT"  menu will 
  230. appear. Highlight "Speed" by using the down arrow key and  press 
  231. Enter. Another menu, "FROM" will show up with  a choice  of mass 
  232. units. Use the arrow  keys to  highlight "miles/hour"  and press 
  233. Enter. In the following "TO" menu select "meters/second"  in the 
  234. same way. The result (26.82...) will  be stored,  again, in  the 
  235. Default Variable, @.
  236.